/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controleur;

import Vue.Essai;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

/**
 *
 * @author Gloire
 */
public class JeuListener implements MouseListener, MouseMotionListener{


    private Essai essai;
    
    public JeuListener(Essai essai){
        this.essai = essai;
    }
    @Override
    public void mouseClicked(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
        essai.resetLabels();
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        essai.relache();
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    }

    @Override
    public void mouseExited(MouseEvent e) {
    }

    @Override
    public void mouseDragged(MouseEvent e) {
        essai.select(e.getPoint());
    }

    @Override
    public void mouseMoved(MouseEvent e) {
    }
    
}
